<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>${word}</h1><br/>

<button id="goToAuth">跳转到授权服务器授权</button>
</body>
</html>
<script type="text/javascript">
document.getElementById("goToAuth").onclick = function() {
    /*params.put("response_type","code");
    params.put("redirect_uri",redirectUrl);
    params.put("app_id","APPID_RABBIT");
    params.put("scope","today history");*/
    let authServerUrl = "http://localhost:8899/authServer/goToAuthPage?response_type=code&redirect_uri=" + encodeURI("http://localhost:8899/client/receiveAuthCode") + "&app_id=APPID_RABBIT&scope=today history";
    console.log("去三方服务器授权了");
    window.location.href = authServerUrl;
}
</script>
